<?php echo '<?xml version="1.0" encoding="utf-8"?>' . "\n"; ?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" 
     xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" 
     xmlns:admin="http://webns.net/mvcb/" 
     xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" 
     xmlns:content="http://purl.org/rss/1.0/modules/content/" 
     xmlns:atom="http://www.w3.org/2005/Atom">
    <channel>
        <title><?php echo $titulo; ?></title>
        <link><?php echo $feed_url; ?></link>
        <atom:link href="<?php echo $feed_url; ?>/feed" rel="self" type="application/rss+xml" />
        <description><?php echo $description; ?></description>
        <language>es-es</language>
        <pubDate><?php echo $pubdate; ?></pubDate>
        <sy:updatePeriod>hourly</sy:updatePeriod>
        <sy:updateFrequency>1</sy:updateFrequency>
        <lastBuildDate><?php echo $pubdate; ?></lastBuildDate>
        <docs>http://www.rssboard.org/rss-specification</docs>
        <generator>Alquilatron</generator>
        <managingEditor>pepmanel81 at gmail dot com</managingEditor>
        <webMaster>pepmanel81 at gmail dot com</webMaster>
        <?php foreach ($posts as $post): ?>
            <item>
                <title><?php echo $post->entry_name; ?></title>
                <link><?php echo base_url() ?>post/<?php echo $post->entry_id; ?></link>
                <comments><?php echo base_url() ?>post/<?php echo $post->entry_id; ?>#comments</comments>
                <description><![CDATA[<?php echo $post->entry_body; ?>]]></description>
                <pubDate><?php echo $post->entry_date; ?></pubDate>
                <dc:creator>Pep Manel</dc:creator>
                <category><![CDATA[]]></category>
                <guid isPermaLink="true"></guid>
                <content:encoded><![CDATA[<?php echo $post->entry_body; ?>]]></content:encoded>
            </item>
        <?php endforeach; ?>
    </channel>
</rss>